4664d64c69840637b564b5f65c5ec0f026e46c10,components/camel-netty/src/main/java/org/apache/camel/component/netty/SingleTCPNettyServerBootstrapFactory.java,SingleTCPNettyServerBootstrapFactory,startServerBootstrap,#,100
Before Change
workerExecutor = Executors.newCachedThreadPool(threadFactory);
}
if (configuration.getWorkerCount() <= 0) {
channelFactory = new NioServerSocketChannelFactory(bossExecutor, workerExecutor);
} else {
channelFactory = new NioServerSocketChannelFactory(bossExecutor, workerExecutor,
After Change
if (wp == null) {
// create new pool which we should shutdown when stopping as its not shared
workerPool = new NettyWorkerPoolBuilder()
.withWorkerCount(configuration.getWorkerCount())
.withName("NettyTCPWorker")
.build();
wp = workerPool;
}
channelFactory = new NioServerSocketChannelFactory(bp, wp);
serverBootstrap = new ServerBootstrap(channelFactory);
serverBootstrap.setOption("child.keepAlive", configuration.isKeepAlive());